'''
Author: Donald Duck tang5722917@163.com
Date: 2022-09-14 20:18:37
LastEditors: Donald duck tang5722917@163.com
LastEditTime: 2024-03-28 11:47:40
FilePath: \spice_netlist_front_end\src\Circuit_control\Control.py
Description:Control base class
Copyright (c) 2022 by Donald Duck email: tang5722917@163.com, All Rights Reserved.
'''
class Control:
# 0  input net connection and .* deck
# 1  input control deck
# -1 Finish netlist input
    def __init__(self,control_line):
        self.control_line = control_line
        self.statue = 0 
        
    def _set_Control_statue(self,n):
        self.statue = n
    
    def _is_start_status(self):
        return ( self.statue == 0 )
    
    def _is_control_status(self):
        return ( self.statue == 1 )

class Control_start(Control):
    def __init__(self):
        self._set_Control_statue(0)

class Control_end(Control):
    def __init__(self):
        self._set_Control_statue(-1)

class Control_endc(Control):
    def __init__(self):
        self._set_Control_statue(0)

class Control_control(Control):
    def __init__(self):
        self._set_Control_statue(1)
